Optimal. Leaf size=69 \[ \frac {b \tanh ^{-1}\left (\frac {b+2 c x^4}{\sqrt {b^2-4 a c}}\right )}{4 a \sqrt {b^2-4 a c}}+\frac {\log (x)}{a}-\frac {\log \left (a+b x^4+c x^8\right )}{8 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.389, Rules used = {1371, 719, 29,
648, 632, 212, 642} \begin {gather*} \frac {b \tanh ^{-1}\left (\frac {b+2 c x^4}{\sqrt {b^2-4 a c}}\right )}{4 a \sqrt {b^2-4 a c}}-\frac {\log \left (a+b x^4+c x^8\right )}{8 a}+\frac {\log (x)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 212
Rule 632
Rule 642
Rule 648
Rule 719
Rule 1371
Rubi steps
\begin {align*} \int \frac {1}{x \left (a+b x^4+c x^8\right )} \, dx &=\frac {1}{4} \text {Subst}\left (\int \frac {1}{x \left (a+b x+c x^2\right )} \, dx,x,x^4\right )\\ &=\frac {\text {Subst}\left (\int \frac {1}{x} \, dx,x,x^4\right )}{4 a}+\frac {\text {Subst}\left (\int \frac {-b-c x}{a+b x+c x^2} \, dx,x,x^4\right )}{4 a}\\ &=\frac {\log (x)}{a}-\frac {\text {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,x^4\right )}{8 a}-\frac {b \text {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^4\right )}{8 a}\\ &=\frac {\log (x)}{a}-\frac {\log \left (a+b x^4+c x^8\right )}{8 a}+\frac {b \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^4\right )}{4 a}\\ &=\frac {b \tanh ^{-1}\left (\frac {b+2 c x^4}{\sqrt {b^2-4 a c}}\right )}{4 a \sqrt {b^2-4 a c}}+\frac {\log (x)}{a}-\frac {\log \left (a+b x^4+c x^8\right )}{8 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.02, size = 66, normalized size = 0.96 \begin {gather*} \frac {\log (x)}{a}-\frac {\text {RootSum}\left [a+b \text {$\#$1}^4+c \text {$\#$1}^8\&,\frac {b \log (x-\text {$\#$1})+c \log (x-\text {$\#$1}) \text {$\#$1}^4}{b+2 c \text {$\#$1}^4}\&\right ]}{4 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 66, normalized size = 0.96
method | result | size |
default | \(-\frac {\frac {\ln \left (c \,x^{8}+b \,x^{4}+a \right )}{4}+\frac {b \arctan \left (\frac {2 c \,x^{4}+b}{\sqrt {4 a c -b^{2}}}\right )}{2 \sqrt {4 a c -b^{2}}}}{2 a}+\frac {\ln \left (x \right )}{a}\) | \(66\) |
risch | \(\frac {\ln \left (x \right )}{a}+\frac {\left (\munderset {\textit {\_R} =\RootOf \left (\left (4 a^{2} c -a \,b^{2}\right ) \textit {\_Z}^{2}+\left (4 a c -b^{2}\right ) \textit {\_Z} +c \right )}{\sum }\textit {\_R} \ln \left (\left (\left (18 a c -5 b^{2}\right ) \textit {\_R} +9 c \right ) x^{4}-a b \textit {\_R} +4 b \right )\right )}{4}\) | \(77\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 223, normalized size = 3.23 \begin {gather*} \left [\frac {\sqrt {b^{2} - 4 \, a c} b \log \left (\frac {2 \, c^{2} x^{8} + 2 \, b c x^{4} + b^{2} - 2 \, a c + {\left (2 \, c x^{4} + b\right )} \sqrt {b^{2} - 4 \, a c}}{c x^{8} + b x^{4} + a}\right ) - {\left (b^{2} - 4 \, a c\right )} \log \left (c x^{8} + b x^{4} + a\right ) + 8 \, {\left (b^{2} - 4 \, a c\right )} \log \left (x\right )}{8 \, {\left (a b^{2} - 4 \, a^{2} c\right )}}, \frac {2 \, \sqrt {-b^{2} + 4 \, a c} b \arctan \left (-\frac {{\left (2 \, c x^{4} + b\right )} \sqrt {-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) - {\left (b^{2} - 4 \, a c\right )} \log \left (c x^{8} + b x^{4} + a\right ) + 8 \, {\left (b^{2} - 4 \, a c\right )} \log \left (x\right )}{8 \, {\left (a b^{2} - 4 \, a^{2} c\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 253 vs.
\(2 (60) = 120\).
time = 98.46, size = 253, normalized size = 3.67 \begin {gather*} \left (- \frac {b \sqrt {- 4 a c + b^{2}}}{8 a \left (4 a c - b^{2}\right )} - \frac {1}{8 a}\right ) \log {\left (x^{4} + \frac {- 16 a^{2} c \left (- \frac {b \sqrt {- 4 a c + b^{2}}}{8 a \left (4 a c - b^{2}\right )} - \frac {1}{8 a}\right ) + 4 a b^{2} \left (- \frac {b \sqrt {- 4 a c + b^{2}}}{8 a \left (4 a c - b^{2}\right )} - \frac {1}{8 a}\right ) - 2 a c + b^{2}}{b c} \right )} + \left (\frac {b \sqrt {- 4 a c + b^{2}}}{8 a \left (4 a c - b^{2}\right )} - \frac {1}{8 a}\right ) \log {\left (x^{4} + \frac {- 16 a^{2} c \left (\frac {b \sqrt {- 4 a c + b^{2}}}{8 a \left (4 a c - b^{2}\right )} - \frac {1}{8 a}\right ) + 4 a b^{2} \left (\frac {b \sqrt {- 4 a c + b^{2}}}{8 a \left (4 a c - b^{2}\right )} - \frac {1}{8 a}\right ) - 2 a c + b^{2}}{b c} \right )} + \frac {\log {\left (x \right )}}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 7.26, size = 68, normalized size = 0.99 \begin {gather*} -\frac {b \arctan \left (\frac {2 \, c x^{4} + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{4 \, \sqrt {-b^{2} + 4 \, a c} a} - \frac {\log \left (c x^{8} + b x^{4} + a\right )}{8 \, a} + \frac {\log \left (x^{4}\right )}{4 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.18, size = 1690, normalized size = 24.49 \begin {gather*} \frac {\ln \left (x\right )}{a}+\frac {\ln \left (c\,x^8+b\,x^4+a\right )\,\left (16\,a\,c-4\,b^2\right )}{2\,\left (16\,a\,b^2-64\,a^2\,c\right )}-\frac {b\,\mathrm {atan}\left (\frac {4\,{\left (4\,a\,c-b^2\right )}^2\,\left (-18\,a^3\,c^3+61\,a^2\,b^2\,c^2-34\,a\,b^4\,c+5\,b^6\right )\,\left (\frac {b^9\,c^4}{128\,a^4\,{\left (4\,a\,c-b^2\right )}^{5/2}}+\frac {2\,b^5\,c^4\,{\left (16\,a\,c-4\,b^2\right )}^4}{{\left (16\,a\,b^2-64\,a^2\,c\right )}^4\,\sqrt {4\,a\,c-b^2}}-\frac {b\,{\left (16\,a\,c-4\,b^2\right )}^3\,\left (256\,b^4\,c^4-\frac {128\,a\,b^4\,c^4\,\left (16\,a\,c-4\,b^2\right )}{16\,a\,b^2-64\,a^2\,c}\right )}{16\,a\,{\left (16\,a\,b^2-64\,a^2\,c\right )}^3\,\sqrt {4\,a\,c-b^2}}+\frac {b^3\,\left (16\,a\,c-4\,b^2\right )\,\left (256\,b^4\,c^4-\frac {128\,a\,b^4\,c^4\,\left (16\,a\,c-4\,b^2\right )}{16\,a\,b^2-64\,a^2\,c}\right )}{256\,a^3\,\left (16\,a\,b^2-64\,a^2\,c\right )\,{\left (4\,a\,c-b^2\right )}^{3/2}}-\frac {3\,b^7\,c^4\,{\left (16\,a\,c-4\,b^2\right )}^2}{4\,a^2\,{\left (16\,a\,b^2-64\,a^2\,c\right )}^2\,{\left (4\,a\,c-b^2\right )}^{3/2}}\right )}{b^4\,c^8\,\left (81\,a\,c-20\,b^2\right )}+\frac {128\,a^5\,x^4\,\left (\frac {\left (23\,a^2\,b\,c^2-24\,a\,b^3\,c+5\,b^5\right )\,\left (\frac {\left (576\,b^3\,c^5-\frac {\left (1280\,b^5\,c^4-4608\,a\,b^3\,c^5\right )\,\left (16\,a\,c-4\,b^2\right )}{2\,\left (16\,a\,b^2-64\,a^2\,c\right )}\right )\,{\left (16\,a\,c-4\,b^2\right )}^4}{16\,{\left (16\,a\,b^2-64\,a^2\,c\right )}^4}+\frac {b^4\,\left (576\,b^3\,c^5-\frac {\left (1280\,b^5\,c^4-4608\,a\,b^3\,c^5\right )\,\left (16\,a\,c-4\,b^2\right )}{2\,\left (16\,a\,b^2-64\,a^2\,c\right )}\right )}{4096\,a^4\,{\left (4\,a\,c-b^2\right )}^2}+\frac {b^2\,\left (1280\,b^5\,c^4-4608\,a\,b^3\,c^5\right )\,{\left (16\,a\,c-4\,b^2\right )}^3}{128\,a^2\,{\left (16\,a\,b^2-64\,a^2\,c\right )}^3\,\left (4\,a\,c-b^2\right )}-\frac {3\,b^2\,\left (576\,b^3\,c^5-\frac {\left (1280\,b^5\,c^4-4608\,a\,b^3\,c^5\right )\,\left (16\,a\,c-4\,b^2\right )}{2\,\left (16\,a\,b^2-64\,a^2\,c\right )}\right )\,{\left (16\,a\,c-4\,b^2\right )}^2}{128\,a^2\,{\left (16\,a\,b^2-64\,a^2\,c\right )}^2\,\left (4\,a\,c-b^2\right )}-\frac {b^4\,\left (1280\,b^5\,c^4-4608\,a\,b^3\,c^5\right )\,\left (16\,a\,c-4\,b^2\right )}{2048\,a^4\,\left (16\,a\,b^2-64\,a^2\,c\right )\,{\left (4\,a\,c-b^2\right )}^2}\right )}{32\,a^5\,c^4\,\left (81\,a\,c-20\,b^2\right )}+\frac {\left (-18\,a^3\,c^3+61\,a^2\,b^2\,c^2-34\,a\,b^4\,c+5\,b^6\right )\,\left (\frac {b^5\,\left (1280\,b^5\,c^4-4608\,a\,b^3\,c^5\right )}{32768\,a^5\,{\left (4\,a\,c-b^2\right )}^{5/2}}-\frac {3\,b^3\,\left (1280\,b^5\,c^4-4608\,a\,b^3\,c^5\right )\,{\left (16\,a\,c-4\,b^2\right )}^2}{1024\,a^3\,{\left (16\,a\,b^2-64\,a^2\,c\right )}^2\,{\left (4\,a\,c-b^2\right )}^{3/2}}+\frac {b\,\left (1280\,b^5\,c^4-4608\,a\,b^3\,c^5\right )\,{\left (16\,a\,c-4\,b^2\right )}^4}{128\,a\,{\left (16\,a\,b^2-64\,a^2\,c\right )}^4\,\sqrt {4\,a\,c-b^2}}-\frac {b\,\left (576\,b^3\,c^5-\frac {\left (1280\,b^5\,c^4-4608\,a\,b^3\,c^5\right )\,\left (16\,a\,c-4\,b^2\right )}{2\,\left (16\,a\,b^2-64\,a^2\,c\right )}\right )\,{\left (16\,a\,c-4\,b^2\right )}^3}{16\,a\,{\left (16\,a\,b^2-64\,a^2\,c\right )}^3\,\sqrt {4\,a\,c-b^2}}+\frac {b^3\,\left (576\,b^3\,c^5-\frac {\left (1280\,b^5\,c^4-4608\,a\,b^3\,c^5\right )\,\left (16\,a\,c-4\,b^2\right )}{2\,\left (16\,a\,b^2-64\,a^2\,c\right )}\right )\,\left (16\,a\,c-4\,b^2\right )}{256\,a^3\,\left (16\,a\,b^2-64\,a^2\,c\right )\,{\left (4\,a\,c-b^2\right )}^{3/2}}\right )}{32\,a^5\,c^4\,\sqrt {4\,a\,c-b^2}\,\left (81\,a\,c-20\,b^2\right )}\right )\,{\left (4\,a\,c-b^2\right )}^{5/2}}{b^4\,c^4}+\frac {4\,{\left (4\,a\,c-b^2\right )}^{5/2}\,\left (23\,a^2\,b\,c^2-24\,a\,b^3\,c+5\,b^5\right )\,\left (\frac {{\left (16\,a\,c-4\,b^2\right )}^4\,\left (256\,b^4\,c^4-\frac {128\,a\,b^4\,c^4\,\left (16\,a\,c-4\,b^2\right )}{16\,a\,b^2-64\,a^2\,c}\right )}{16\,{\left (16\,a\,b^2-64\,a^2\,c\right )}^4}+\frac {b^4\,\left (256\,b^4\,c^4-\frac {128\,a\,b^4\,c^4\,\left (16\,a\,c-4\,b^2\right )}{16\,a\,b^2-64\,a^2\,c}\right )}{4096\,a^4\,{\left (4\,a\,c-b^2\right )}^2}-\frac {b^8\,c^4\,\left (16\,a\,c-4\,b^2\right )}{8\,a^3\,\left (16\,a\,b^2-64\,a^2\,c\right )\,{\left (4\,a\,c-b^2\right )}^2}+\frac {2\,b^6\,c^4\,{\left (16\,a\,c-4\,b^2\right )}^3}{a\,{\left (16\,a\,b^2-64\,a^2\,c\right )}^3\,\left (4\,a\,c-b^2\right )}-\frac {3\,b^2\,{\left (16\,a\,c-4\,b^2\right )}^2\,\left (256\,b^4\,c^4-\frac {128\,a\,b^4\,c^4\,\left (16\,a\,c-4\,b^2\right )}{16\,a\,b^2-64\,a^2\,c}\right )}{128\,a^2\,{\left (16\,a\,b^2-64\,a^2\,c\right )}^2\,\left (4\,a\,c-b^2\right )}\right )}{b^4\,c^8\,\left (81\,a\,c-20\,b^2\right )}\right )}{4\,a\,\sqrt {4\,a\,c-b^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________